﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace Cockcrow
{
    public partial class InputNick : Form
    {
        private ChatMainForm frm;
        public InputNick(ChatMainForm frm) { InitializeComponent(); this.frm = frm; }
        public void NickChangeOk(string nick) { frm.NickChange(nick); }
        private void ChangeNickOK(object sender, EventArgs e)
        {
            if (!String.IsNullOrEmpty(ChangeNickTextBox.Text)) { NickChangeOk(ChangeNickTextBox.Text); this.Close(); } 
        }
        private void ChangeNickCancel(object sender, EventArgs e) { this.Close(); }                // 취소버튼 누르면 그냥 닫기
        private void EnterKey(object sender, KeyEventArgs e) { if ((e.KeyCode == System.Windows.Forms.Keys.Enter)) { ChangeNickOK(sender, e); } }
    }
}